<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=S, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        houdunren.com
      </div>

      <h1>houdunren.com@h1</h1>
      <h2>houdunwang@h2</h2>
      <span id="span">span元素</span>
    <script>
        //append添加结点
 let app = document.querySelector('#app')
  app.append('-houdunwang.com')

  //before放在之前，after放在之后
  let h1 = document.querySelector('h1');
  let h2 = document.querySelector('h2');
  h1.before(h2);//h2放在h1之前

  //replaceWith替换新内容

  //remove删除结点
  let span =document.querySelector("#span");
  span.remove();
    </script>
</body>
</html>